<%@ page language="java" pageEncoding="utf-8"%>


<style>
    <!--/*** sumo CSS样式 **/-->
    .SumoSelect {width: 220px;height: 27px;color: rgb(65, 137, 203);font-size: 13px;}
    .SumoSelect label {font-size: 13px;}
    .SumoSelect span {font-size: 13px;}
    .SumoSelect > p {height: 27px;}
    .SumoSelect .select-all {height: 36px;}

    <!--/*** textarea CSS样式 **/-->
    .input_text{ width: 220px;height: 85px;border: 1px solid rgb(65, 137, 203);color: rgb(65, 137, 203);padding: 5px 5px 5px 8px;font-size: 13px; }
</style>


<!--/*** 控件HTML标签 **/-->
<div class="col-md-12" style="margin-top:10px;padding: 0 0 0 5px;">
    <div class="col-md-3" style="padding: 0;">
        <label style="color: rgb(65, 137, 203);font-size: 12px;padding: 0px;margin: 0px;">原材料料号:</label>
    </div>
    <div class="col-md-9">
        <select id="bomMaterialSumo" multiple="multiple"></select>
        <!--<textarea id="bomMaterialText" class="input_text"></textarea>-->
    </div>
</div>



<script>
    //    $(document).ready(function () {
    $("#bomMaterialSumo").SumoSelect({
        search: true,
        searchText: 'Enter here.',
        captionFormat: '已选择：{0}(项)',
        selectAll:true,
        captionFormatAllSelected: "全选",
        okCancelInMulti: true,
        locale :  ['确定', '取消', '全选'],
        isClickAwayOk: true,
    });


    function iniBomMaterialSumoInfoFnc(start_time, end_time){
        if (start_time == undefined) start_time = $.trim($("#startTime").val());
        if (end_time == undefined) end_time = $.trim($("#endTime").val());
        var inTrxObj = {
            start_time       : start_time,
            end_time         : end_time,
            bay_id           : $.trim($("#ivLineSumo").val()),
            product_material : $.trim($("#productMaterialSumo").val())
        };
        comAddSelectValueFnc("#bomMaterialSumo","BOMMTRL", inTrxObj,false,false);
        $('#bomMaterialSumo')[0].sumo.reload();
    };
    iniBomMaterialSumoInfoFnc();
    $("#ivLineSumo").change(function (){iniBomMaterialSumoInfoFnc();});
    $("#productMaterialSumo").change(function (){iniBomMaterialSumoInfoFnc();});
    //    });
</script>